<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace= "LCA.Community.DAL.Model" %>
<%@ Import Namespace= "LCA.Community.Web.Controllers" %>
<%@ Import Namespace="Microsoft.Web.Mvc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        function onBegin() {
            $("#loading").show();
            $("#volunteers").slideUp("fast");
        };

        function onComplete() {
            $("#loading").hide();
            $("#volunteers").slideDown("fast");
        };
    </script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content-main">
        <h2><img src="<%= Url.Content("~/Content/images/FinalDesign/Icons/search_help24.png")%>"/>Buscar voluntarios</h2>
        <% using (Ajax.BeginForm("SearchVolunteersFromCity", "Volunteer", new AjaxOptions() { InsertionMode = InsertionMode.Replace, UpdateTargetId = "volunteers", HttpMethod = "POST", OnBegin="onBegin", OnComplete="onComplete" }))
           { %>
            <table cellspacing="10">
                <tr>
                    <td><label for="city">Ciudad:</label></td>
                    <td><%= Html.TextBox("city","",new { size = 40, style = "display:inline;" }) %><%= Html.SubmitImage("submitbutton", Url.Content("~/Content/images/FinalDesign/Icons/search24.png"), new { style="display:inline;margin-left:5px;" })%><img width="24px" id="loading" src="<%= Url.Content("~/Content/images/LCA_logo_rotor.gif") %>" alt="Cargando..." style="display: none;vertical-align:middle;" /></td>
                </tr>
            </table>
        <% } %>
        <div class="volunteers" id="volunteers">
            <% Html.RenderPartial("ShowVolunteers", new List<User>()); %>
        </div>
    </div>
    
    <div class="content-right">
        <% Html.RenderPartial("UserMenu", ViewData["user"]); %>
    </div>
</asp:Content>